import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class Test22 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 100,
      height: 100,
      child: Image.network(
          'https://www.wanandroid.com/blogimgs/ad6289d3-7d21-424a-898d-040dbbe46af8.png',
          loadingBuilder: (
        BuildContext context,
        Widget child,
        ImageChunkEvent loadingProgress,
      ) {
        if (loadingProgress == null) {
          return child;
        }
        return CircularProgressIndicator(
          value: loadingProgress == null
              ? null
              : loadingProgress.cumulativeBytesLoaded /
                  loadingProgress.expectedTotalBytes,
        );
      }),
    );
  }
}
